Skip to main content

Swift Package Manager Integration

Step 1 - Project package list

In your Xcode Project, select the project icon in the project navigator and select your project configuration file on the sidebar.

Step 1.1

Next, select the Package Dependencies submenu on the topbar and click on the + sign to add a new package to your project.

Step 1.2

A new window will appear, in this window you will search for our package with this url: https://grouplinknetwork@bitbucket.org/group-link-ios/group-link-package.git. Select the Group Link Package and click in the Add Package button, this will fetch the package from our repository and add to your project.

https://github.com/Group-Link-One/iOSGrouplinkStatic

Step 3

Be sure to select your project checkbox to add the Group Link Package correctly.

Step 4

To check if everything went well, see if the package is present in the sidebar and in the package list screen

Step 5

Step 4 - Implementing the SDK Functions

To import the GroupLink module into your framework code, use the import attribute with the @_implementationOnly tag as described below. Then, you can proceed with the iOS Initialization process.

import Foundation
@_implementationOnly import GroupLinkStatic

public class TestFrameworkSDK {
public static func printVersion() {
print("Test Version: 1.0.0")
}

public static func startTestFramework() {
print("Starting Test Framework")
// ...
GroupLinkSDK.start(withToken: "")
GroupLinkSDK.startBluetooth()
}
}

Step 5 - Distributing the framework

Once you've added all the code, ensure that your framework includes the GroupLink.xcframework file in your build. You can verify this information within your project file's Build Phases.

Build Phases

The finalized framework folder structure should resemble the following format.

Finalized Framework